<script>
	$(document).ready(function(){
		// onchange
		$('#kd_fakultas').change(function(){
			$('#kd_prodi').load(base_url+'prosedur/getProdibyFakultas/'+$('#kd_fakultas').val());
		});
		$('#kd_prodi').change(function(){
			$('#id_tahunajaran').load(base_url+'prosedur/getTahunajaranbyProdi/'+$('#kd_prodi').val());
		});
		$('#kd_kurikulum').change(function(){
			$('#kd_matakuliah').load(base_url+'prosedur/getMatakuliah/'+$('#kd_kurikulum').val());
		});
	});
</script>

<form id="form1" method="post" action="some_action" enctype="multipart/form-data" style="margin:10px;">
	<input type="hidden" name="kode" id="kode" value="<?=$kode?>">
	<div class="fitem" >
		<label style="width:135px">Fakultas</label>: 
		<select id="kd_fakultas" name="kd_fakultas" style="width:200px;">
			<?=$this->mdl_prosedur->OptionFakultasByUniv(array('value'=>$kd_fakultas));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Prodi</label>: 
		<select id="kd_prodi" name="kd_prodi" style="width:200px;">
			<?=$this->mdl_prosedur->OptionProdi(array('kd_fakultas'=>$kd_fakultas, 'value'=>$kd_prodi));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Tahun Ajaran</label>: 
		<select id="id_tahunajaran" name="id_tahunajaran" style="width:200px;">
			<?=$this->mdl_prosedur->OptionTahunajaranbyProdi(array('kd_prodi'=>$kd_prodi, 'value'=>id_tahunajaran));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Nama Mahasiswa</label>: 
		<select id="nim" name="nim" style="width:200px;">
			<?=$this->mdl_prosedur->OptionMahasiswabytahun(array('kd_prodi'=>$kd_prodi, 'value'=>id_tahunajaran));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Kurikulum</label>: 
		<select id="kd_kurikulum" name="kd_kurikulum" style="width:200px;">
			<?=$this->mdl_prosedur->OptionKurikulum(array('kd_prodi'=>$kd_prodi, 'value'=>$kd_kurikulum));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Mata Kuliah</label>: 
		<select id="kd_matakuliah" name="kd_matakuliah" style="width:280px;">
			<?=$this->mdl_prosedur->OptionMatakuliah(array('kd_kurikulum'=>$kd_kurikulum, 'value'=>$kd_matakuliah));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Nama Kelas</label>: 
		<input name="kd_kelas" value="<?=$kd_kelas?>" size="30">
	</div>
	<div class="fitem">
		<label style="width:135px;">Jenis Jadwal</label>: 
		<select id="kd_jenisjadwal" name="kd_jenisjadwal" style="width:200px;">
			<?=$this->mdl_prosedur->OptionJenisJadwal(array('value'=>$kd_jenisjadwal));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">SKS</label>: 
		<input name="SKS" value="<?=$SKS?>" size="7" maxlength="2"> Isikan dengan -1 jika jumlah SKS menggunakan SKS asli dari matakuliah.
	</div>
	<div class="fitem">
		<label style="width:135px;">Ruang</label>: 
		<select id="kd_ruang" name="kd_ruang" style="width:200px;">
			<?=$this->mdl_prosedur->OptionRuang(array('value'=>$kd_ruang));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Dosen Pengampu</label>: 
		<select id="kd_dosen" name="kd_dosen" style="width:280px;">
			<?=$this->mdl_prosedur->OptionDosen(array('value'=>$kd_dosen));?>
		</select>
	</div>
	<div class="fitem">
		<label style="width:135px;">Rencana tatap Muka</label>: 
		<input name="RencanaKehadiran" value="<?=$RencanaKehadiran?>" size="7" maxlength="2">
	</div>
	<div class="fitem">
		<label style="width:135px;">Minimal Kehadiran Mhs</label>: 
		<input name="KehadiranMin" value="<?=$KehadiranMin?>" size="7" maxlength="2">
	</div>
</form>

	

